Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(task): extend mise tasks output #1845

Merged
merged 4 commits into from
Mar 30, 2024
Merged

feat(task): extend mise tasks output #1845

merged 4 commits into from
Mar 30, 2024

Conversation

roele
Copy link
Contributor

@roele roele commented Mar 30, 2024

Adds the following options to mise tasks ls to enable output of all columns and sorting.

--full - Show all columns
--sort <COLUMN> - Sort by column. Default is name. [possible values: name, alias, description, source]
--sort-order <SORT_ORDER> - Sort order. Default is asc. [possible values: asc, desc]

Resolves #1623

@jdx
Copy link
Owner

jdx commented Mar 30, 2024

Not sure I like --full, maybe -x,--extended? I'm wondering if there are any conventions out there

@jdx
Copy link
Owner

jdx commented Mar 30, 2024

As a random aside, I'm not totally happy with our table library or how we use it in mise. I would like to refactor all the table code and possibly extract it like we did for demand.

It's not terrible but I would like a simpler interface. I'm wondering if we could find a way to have nice conventions like you did for sorting here on the front-end that cleanly integrate with table output so we could use it everywhere in mise.

@roele
Copy link
Contributor Author

roele commented Mar 30, 2024

Agree, --full sounds odd, maybe -e or -x for --extended is better.

Regarding the output, most tools nowadays provide an --output <FORMAT> option which lets you even choose the format like json, yaml or table. Not sure if that makes sense in context of mise though.

@jdx
Copy link
Owner

jdx commented Mar 30, 2024

let's go with -x,--extended. I feel like I've seen that in other CLIs. "-x" isn't very likely to conflict with anything I don't think. We do have json output in a few commands, mise ls is one.

@jdx jdx enabled auto-merge (squash) March 30, 2024 18:31
@jdx jdx merged commit 104307c into jdx:main Mar 30, 2024
7 checks passed
@roele roele deleted the issues/1623 branch March 30, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend mise tasks output
2 participants